﻿@model mvcForum.Web.Areas.ForumAPI.ViewModels.AccessMask
@{
	String ns = "MVCForum.ForumAdmin.Board.Index";
}
	<div id="newaccessmaskmodal" class="modal hide" data-bind="css: { hide: AddMaskHidden }">
		<div class="modal-header">
			<button type="button" class="close" data-bind="click: HideAddMask">&times;</button>
			<h3>@Html.LocalizedString("AddAccessMaskHeading", ns)</h3>
		</div>
		<!-- ko with: CreateAccessMaskModal -->
		<div class="modal-body">
			@using (Html.BeginForm("create", "accessmask", new { area = "forumadmin", id = Model.Id })) {
				<fieldset>
					<legend class="hide"></legend>
					<div class="control-group" data-bind="css: { error: !Name.isValid() }">
						@Html.LabelFor(x => x.Name, new { @class = "control-label" })
						<div class="controls">
							@Html.TextBoxFor(x => x.Name, new { @class = "input-large", data_bind = "value: Name" })
						</div>
					</div>
					<div class="control-group">
						@Html.LabelFor(x => x.AccessFlag, new { @class = "control-label" })
						<div class="controls">
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Read" />
								Read
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Post" />
								Post
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Reply" />
								Reply
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Priority" />
								Priority
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Poll" />
								Poll
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Vote" />
								Vote
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Moderator" />
								Moderator
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Edit" />
								Edit
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Delete" />
								Delete
							</label>
							<label class="checkbox">
								<input type="checkbox" data-bind="checked: AccessFlag" value="Upload" />
								Upload
							</label>
						</div>
					</div>
				</fieldset>
			}
		</div>
		<div class="modal-footer">
			<a href="#" class="btn" data-bind="click: $parent.HideAddMask">@Html.LocalizedString("AddAccessMaskClose", ns)</a>
			<a href="#" class="btn btn-primary" data-bind="click: Create">@Html.LocalizedString("AddAccessMaskCreate", ns)</a>
		</div>
		<!-- /ko -->
	</div>
